package org.example.biz.entity;

import com.anwen.mongo.annotation.ID;
import com.anwen.mongo.annotation.collection.CollectionField;
import com.anwen.mongo.annotation.collection.CollectionName;
import com.anwen.mongo.enums.FieldFill;
import java.util.Date;
import java.util.Map;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * @Title : ThirdDeductFlow
 * @Description: 还款入账MongoDB快照类
 * @author: libo@juzishuke.com
 * @date: 2023/12/13 15:49
 * @Version:1.0
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@CollectionName("third_deduct_snapshot")
@Document(collection = "third_deduct_snapshot")
public class ThirdDeductSnapshot implements Updateable,IDable {

    @ID     //使用ID注解，标注此字段为MongoDB的_id，或者继承BaseModelID类
    private String                       id;
    /**
     * 划扣表id，用于关联数据
     */
    private String                       thirdDeductId;
    /**
     * 桔子订单ID
     */
    private String                       orderId;
    /**
     * 初始状态，还款计划
     */
    private Map<String, Object>          beginning;
    /**
     *
     */
    private Trail                        trail;
    /**
     * 入账流水/还款流水
     */
    private Primary transaction;
    /**
     * 试算结果
     */
    /**
     * 入账流水/还款流水
     */
    /**
     * 还款后的还款计划
     */
    private Map<String, Object>          ending;


    /**
     * 记录创建时间
     */
    @CollectionField(fill = FieldFill.INSERT, value = "createTime")
    private Date createTime;

    /**
     * 修改时间
     */
    @CollectionField(fill = FieldFill.INSERT_UPDATE, value = "updateTime")
    private Date updateTime;
}
